<html>
<body>

<?php 
$myShape1=new SWFShape(); 
$myShape1->setLine(5,0,0,255); 
$myShape1->drawLine(440,0); 

$myShape2=new SWFShape(); 
$myShape2->setLine(1,0,0,0); 
$myShape2->setRightFill(0,255,0); 
$myShape2->drawLine(50,0); 
$myShape2->drawLine(0,50); 
$myShape2->drawLine(-50,0); 
$myShape2->drawLine(0,-50); 

$myShape3=new SWFShape(); 
$myShape3->setLine(1,0,0,0); 
$myShape3->setRightFill(255,0,255); 
$ra = 40; 
$x = 40; 
$y = 40; 
$a = $ra * 0.414213562; // = tan(22.5 deg)
$b = $ra * 0.707106781; // = sqrt(2)/2 = sin(45 deg)
$myShape3->movePenTo($x+$ra, $y); 
$myShape3->drawCurveTo($x+$ra, $y-$a, $x+$b, $y-$b); 
$myShape3->drawCurveTo($x+$a, $y-$ra, $x, $y-$ra); 
$myShape3->drawCurveTo($x-$a, $y-$ra, $x-$b, $y-$b); 
$myShape3->drawCurveTo($x-$ra, $y-$a, $x-$ra, $y); 
$myShape3->drawCurveTo($x-$ra, $y+$a, $x-$b, $y+$b); 
$myShape3->drawCurveTo($x-$a, $y+$ra, $x, $y+$ra); 
$myShape3->drawCurveTo($x+$a, $y+$ra, $x+$b, $y+$b); 
$myShape3->drawCurveTo($x+$ra, $y+$a, $x+$ra, $y); 

$myFont=new SWFFont("FreeSerif.fdb"); 

$myText=new SWFText(); 

$myText->setFont($myFont); 

$myText->setColor(255,255,0); 

$myText->setHeight(40); 

$myText->addString(" My First Flash!"); 


$myMovie=new SWFMovie(); 
$myMovie->setDimension(460,80); 
$myMovie->setBackground(255,0,0); 

$firstLine=$myMovie->add($myShape1); 
$firstLine->moveTo(10,10); 

$secondLine=$myMovie->add($myShape1); 
$secondLine->moveTo(10,70); 

$firstSquare=$myMovie->add($myShape2); 
$firstSquare->moveTo(15,15); 

$secondSquare=$myMovie->add($myShape2); 
$secondSquare->moveTo(395,15); 

$firstCircle=$myMovie->add($myShape3); 
$firstCircle->moveTo(190,0); 

$firstText=$myMovie->add($myText); 
$firstText->moveTo((460/2-($myText->getWidth(" My First Flash!"))/2)+10,50); 

$myMovie->save("temp/lesson5.swf"); 

?> 

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" ID=objects WIDTH=460 HEIGHT=80>
<PARAM NAME=movie VALUE="temp/lesson5.swf">
<EMBED src="temp/lesson5.swf" WIDTH=460 HEIGHT=80 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</OBJECT>

</body>
</html>